﻿
namespace vashSMJ
{
    public abstract class StateBase
    {
        public abstract void OnStateEnter();
        public abstract void OnStateExit();
    }

    public class StateOwnerBase
    {
        protected StateBase curState;

        public StateBase getCurState()
        {
            return curState;
        }
        public void ChangeState(StateBase state)
        {
            curState.OnStateExit();
            curState = state;
            curState.OnStateEnter();
        }
    }

}
